package com.loveprogrammer.dto.base;

import com.loveprogrammer.pojo.StringMessage;

import java.io.Serializable;

/**
 * @ClassName RequestBase
 * @Description 请求基类
 * @Author admin
 * @Date 2024/2/19 10:35
 * @Version 1.0
 */
public class RequestBase implements Serializable {

    /**
     * 请求成功的路由topic
     */
    private int successCallbackTopic;

    /**
     * 请求成功的路由tag
     */
    private int successCallbackTag;

    /**
     * 请求失败的路由topic
     */
    private int errorCallbackTopic;

    /**
     * 请求失败的路由tag
     */
    private int errorCallbackTag;

    public RequestBase() {
    }

    public RequestBase(StringMessage message) {
        this.successCallbackTopic = message.getTopicId();
        this.successCallbackTag = message.getTagId();
        this.errorCallbackTopic = message.getTopicId();
        this.errorCallbackTag = message.getTagId();
    }

    public RequestBase(int successCallbackTopic, int successCallbackTag) {
        this.successCallbackTopic = successCallbackTopic;
        this.successCallbackTag = successCallbackTag;
        this.errorCallbackTopic = successCallbackTopic;
        this.errorCallbackTag = successCallbackTag;
    }

    public RequestBase(int successCallbackTopic, int successCallbackTag, int errorCallbackTopic, int errorCallbackTag) {
        this.successCallbackTopic = successCallbackTopic;
        this.successCallbackTag = successCallbackTag;
        this.errorCallbackTopic = errorCallbackTopic;
        this.errorCallbackTag = errorCallbackTag;
    }

    /***
     * 失败的文案
     */
    private String errorMsg;

    public int getSuccessCallbackTopic() {
        return successCallbackTopic;
    }

    public void setSuccessCallbackTopic(int successCallbackTopic) {
        this.successCallbackTopic = successCallbackTopic;
    }

    public int getSuccessCallbackTag() {
        return successCallbackTag;
    }

    public void setSuccessCallbackTag(int successCallbackTag) {
        this.successCallbackTag = successCallbackTag;
    }

    public int getErrorCallbackTopic() {
        return errorCallbackTopic;
    }

    public void setErrorCallbackTopic(int errorCallbackTopic) {
        this.errorCallbackTopic = errorCallbackTopic;
    }

    public int getErrorCallbackTag() {
        return errorCallbackTag;
    }

    public void setErrorCallbackTag(int errorCallbackTag) {
        this.errorCallbackTag = errorCallbackTag;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
